package com.oscar.dao;

import java.util.ArrayList;

import com.oscar.dto.ItemTicket;
import com.oscar.nail.WCFNail;


public class ItemTicketDAO {
	private  WCFNail nailservice = new WCFNail();
	public ItemTicketDAO() {
	}
	public  ArrayList<ItemTicket> getListItemTicketByIDTicket(final int id)
	{
		ArrayList<ItemTicket> dsItemTicket = new ArrayList<ItemTicket>();
		dsItemTicket.addAll(nailservice.getListItemTicketByIDTicket(new ArrayList<String>() {
			{
				add(Integer.toString(id));
			}
		}));
		return dsItemTicket;
	}
	public ItemTicket getItemTicketById(final int id)
	{
		return nailservice.getItemTicketById(new ArrayList<String>(){{
			add(Integer.toString(id));
		}});
	}
	public boolean updateItemTicket(ItemTicket itemticket)
	{
		return nailservice.updateItemTicket(itemticket);
	}
	public boolean deleteItemTicket(final int idItemTicket)
	{
		return nailservice.deleteItemTicket(new ArrayList<String>(){{
			add(Integer.toString(idItemTicket));
		}});
	}
	public int insertItemTicket(ItemTicket itemticket)
	{
		return nailservice.insertItemTicket(itemticket);
	}
	public boolean deleteItemTicketByIDTicket(final int id)
	{
		return nailservice.deleteItemTicketByIDTicket(new ArrayList<String>(){{
			add(Integer.toString(id));
		}});
	}
}
